package com.rs.game.player.dialogues.impl;

import com.rs.game.player.dialogues.Dialogue;
import com.rs.utils.ShopsHandler;

public class Artisan extends Dialogue {

	private int npcId;

	@Override
	public void start() {
		npcId = (Integer) parameters[0];
		sendNPCDialogue(npcId, 9827, "I am the Artisan, I control all the skilling shops, would you like to view my shops?");
		stage = 0;
	}

	@Override
	public void run(int interfaceId, int componentId) {
		if (stage == 0) {
			sendOptionsDialogue("Skilling Shops", "Crafting Shop", "Woodcutting Shop", "Mining Shop", "Hunting Shop", "More...");
			stage = 1;
		} else if (stage == 1) {
			if (componentId == OPTION_1) {
				ShopsHandler.openShop(player, 18);
				end();
			} else if (componentId == OPTION_2) {
				ShopsHandler.openShop(player, 19);
				end();
			} else if (componentId == OPTION_3 ) {
				ShopsHandler.openShop(player, 20);
				end();
			} else if (componentId == OPTION_4) {
				ShopsHandler.openShop(player, 21);
				end();
			} else if (componentId == OPTION_5) {
				sendOptionsDialogue("Skilling Shops", "Farming Tools Shop", "Fishing Shop", "Back");
				stage = 2;
			}
		} else if (stage == 2) {
			if (componentId == OPTION_1) {
				ShopsHandler.openShop(player, 24);
				end();
			} else if (componentId == OPTION_2) {
				ShopsHandler.openShop(player, 15);
				end();
			} else if (componentId == OPTION_3) {
				sendOptionsDialogue("Skilling Shops", "Crafting Shop", "Woodcutting Shop", "Mining Shop", "Hunting Shop", "More...");
				stage = 1;
			}
		} 
	} 

	@Override
	public void finish() {
		// TODO Auto-generated method stub

	}

}